﻿MESSAGE(STATUS "ProjectDir = ${PROJECT_SOURCE_DIR}")

SET(CMAKE_CXX_STANDARD 17)

aux_source_directory(Model Model_LIST)
aux_source_directory(Controller Controller_LIST)
aux_source_directory(Controller/ViewController ViewController_LIST)
aux_source_directory(Service/Logging Logging_LIST)
aux_source_directory(Service/Mesh Mesh_LIST)
aux_source_directory(Service/Helper Helper)

set(sources
${Model_LIST}
${Controller_LIST}
${ViewController_LIST}
${Logging_LIST}
${Mesh_LIST}
)

set(qrc_files)
set(interfaces)
set(ui_files UIs/cubewidget.ui)
set(xml_Widget UIs/BoxWidget.xml)

 list(APPEND qrc_files
    PanGu.qrc)

list(APPEND CMAKE_AUTOUIC_SEARCH_PATHS
  "${CMAKE_CURRENT_SOURCE_DIR}/UIs")

set(CMAKE_AUTOMOC 1)
set(CMAKE_AUTOUIC 1)
paraview_plugin_add_property_widget(
  KIND WIDGET
  TYPE "my_property_widget_type"
  CLASS_NAME pqMyPropertyWidgetForProperty
  INTERFACES property_interfaces
  SOURCES property_sources)

list(APPEND interfaces
  ${property_interfaces})
list(APPEND sources
  ${property_sources})



paraview_add_plugin(Pangu
  REQUIRED_ON_CLIENT
  VERSION "1.0"
  UI_RESOURCES ${qrc_files}
  UI_FILES ${ui_files}
  UI_INTERFACES ${interfaces}
  SOURCES ${sources}
  SERVER_MANAGER_XML ${xml_Widget}
)

target_include_directories(Pangu
PRIVATE 
Model
Controller
Controller/ViewController
Service/Logging
Service/Mesh
Service/Helper
)

target_link_libraries(Pangu
  PRIVATE
     ParaView::pqApplicationComponents
     catalyst::catalyst
)


